package com.txq.bilibili.app.model;

import android.util.Log;
import org.json.JSONException;
import org.json.JSONObject;

/**
 * Created by yun on 2015/3/24.
 */
public class AlwaysContent {

    //社区第一个界面的Gridview 的item 的id
    private int id;

    private int type;

    private String descrepton;

    //最新回复数
    private long nReplies;

    //在线人数
    private long onlineCnt;

    //上次刷新时间
    private long lastUpdateTime;

    //点击gridview时  进入下一个界面的头像
    private String picUrl;

    //标题  显示在Gridview的子项上或者点击进入下一个界面时的头标题
    private String title;

    //总回复数
    private  long nAllReplies;

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public int getType() {
        return type;
    }

    public void setType(int type) {
        this.type = type;
    }

    public String getDescrepton() {
        return descrepton;
    }

    public void setDescrepton(String descrepton) {
        this.descrepton = descrepton;
    }







    public long getLastUpdateTime() {
        return lastUpdateTime;
    }

    public void setLastUpdateTime(long lastUpdateTime) {
        this.lastUpdateTime = lastUpdateTime;
    }

    public String getPicUrl() {
        return picUrl;
    }

    public void setPicUrl(String picUrl) {
        this.picUrl = picUrl;
    }

    public String getTitle() {
        return title;
    }

    public long getnReplies() {
        return nReplies;
    }

    public void setnReplies(long nReplies) {
        this.nReplies = nReplies;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public long getnAllReplies() {
        return nAllReplies;
    }

    public void setnAllReplies(long nAllReplies) {
        this.nAllReplies = nAllReplies;
    }

    public void parseJson(JSONObject jsonObject){

        try {

            id=jsonObject.getInt("id");
            type=jsonObject.getInt("type");
            descrepton=jsonObject.getString("description");
            nReplies=jsonObject.getInt("nReplies");
            onlineCnt=jsonObject.getLong("onlineCnt");
            lastUpdateTime=jsonObject.getLong("lastUpdateTime");
            title=jsonObject.getString("title");
            Log.d("title......",title);
            picUrl=jsonObject.getString("picUrl");
            nAllReplies=jsonObject.getLong("nAllReplies");

        } catch (JSONException e) {
            e.printStackTrace();
        }

    }
}
